<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <!--
        应该不许要加载此项
        <script src="../../js/mini/jquery-smartMenu-min.js"></script>
    -->
    <script src="../../js/jquery-1.8.0.min.js"></script>
    <script src="../../js/jquery-smartMenu.js"></script>
    <link rel="stylesheet" href="../../css/smartMenu.css">
</head>
<body>
<table >
    <tr>
        <td> test1</td>
        <td> test2</td>
        <td> test3</td>
    </tr>
    <p id="test">test</p>
</table>

    <script>
        /*var data = [
            [{}, {}, {}],
            //每加单独一组，会有分割线
            [{}],
            //复合写法
            [[
                text: "", data: [{},{},{}]
            ]]
          ];
         */
        var data=[
            [
                //单个菜单
                {
                    text: "零组件计划预判",
                    func: function () {
                        alert("工单提取计划粗排")
                    }
                },
                //复合
                {
                    text:"复合菜单",
                    data: [[
                        {
                            text: "复合一",
                            func: function () {
                                alert("复合一")
                            }
                        },
                        {
                            text:"复合二",
                            func: function () {
                                alert("复合二")
                            }
                        },
                        {
                            text:"复合三",
                            func: function () {
                                alert("复合三")
                            }
                        }
                    ]]
                }
            ]
        ];
        //在每一个td上可以右击出菜单
        $("body td").smartMenu(data);
        //在指定id上右击出菜单
        $("#test").smartMenu(data);
    </script>
</body>
</html>